package com.nxk.modules.content.api;

import com.nxk.modules.content.entity.ConColunm;
import com.nxk.modules.content.service.ConColunmService;
import com.nxk.modules.core.entity.SysOffice;
import com.nxk.modules.core.service.SysOfficeService;
import com.nxk.modules.exception.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/web/api/topBar")
public class TopBarApiController {


    @Autowired
    private SysOfficeService sysOfficeService;

    @Autowired
    private ConColunmService conColunmService;


    @PostMapping("/officeDetail")
    public ResultEntity officeDetail(SysOffice sysOffice){
        return ResultEntity.success(sysOfficeService.getById(sysOffice));
    }

    @PostMapping("/colunmDetail")
    public ResultEntity colunmDetail(ConColunm conColunm){
        return ResultEntity.success(conColunmService.listAll(conColunm));
    }






}
